import request from '@/utils/request.js'

//获取分类数据
export const getCategory = (
  obj = {
    category_id: 2,
    sales: 1,
    price: 0,
    comments_count: 0
  }
) =>
  request.get(
    `/api/goods?category_id=${obj.category_id}&sales=${obj.sales}&price=${obj.price}&comments_count=${obj.comments_count}`
  )

//获取商品详情
export const getGoodsDetail = (id) => request.get(`/api/goods/${id}`)
